//
//  LMBaseTableView.h
//  LMLabelSelect
//
//  Created by LM on 2022/12/1.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef UITableViewCell* (^CellForRowAtIndexPathBlock)(UITableView *tableView, NSIndexPath *indexPath);
typedef NSInteger (^NumberOfRowsInSectionBlock)(UITableView *tableView, NSInteger section);
typedef NSInteger (^NumberOfSectionsInTableViewBlock)(UITableView *tableView);
typedef CGFloat (^HeightForRowAtIndexPathBlock)(UITableView *tableView, NSIndexPath *indexPath);
typedef void (^DidSelectRowAtIndexPathBlock)(UITableView *tableView, NSIndexPath *indexPath);
typedef void (^DidDeSelectRowAtIndexPathBlock)(UITableView *tableView, NSIndexPath *indexPath);
typedef UIView* (^ViewForSectionHeader)(UITableView *tableView, NSInteger section);
typedef UIView* (^ViewForSectionFooter)(UITableView *tableView, NSInteger section);
typedef NSInteger (^HeightForSectionHeader)(UITableView *tableView, NSInteger section);
typedef CGFloat (^HeightForSectionFooter)(UITableView *tableView, NSInteger section);
typedef BOOL (^ShouldRecognize)(UIGestureRecognizer *gestureRecognizer, UIGestureRecognizer *otherGestureRecognizer);

typedef void (^ScrollViewDidScroll)(UIScrollView *scrollView);
typedef void (^ScrollViewDidEndDecelerating)(UIScrollView *scrollView);
typedef void (^ScrollViewWillBeginDecelerating)(UIScrollView *scrollView);
typedef void (^willDisplayCell)(UITableView *tableView, UITableViewCell *cell, NSIndexPath *indexPath);
typedef void (^ScrollViewDidEndDragging)(UIScrollView *scrollView, BOOL decelerate);
typedef void (^ScrollViewDidScrollToTop)(UIScrollView *scrollView);
typedef void (^ScrollViewWillBeginDragging)(UIScrollView *scrollView);

@interface LMBaseTableView : UITableView<UIGestureRecognizerDelegate>
@property (nonatomic, copy) ShouldRecognize shouldRecognize;
@property (nonatomic, copy) NumberOfRowsInSectionBlock numberOfRowsBlock;
@property (nonatomic, copy) CellForRowAtIndexPathBlock cellForRowBlock;
@property (nonatomic, copy) NumberOfSectionsInTableViewBlock numberOfSectionsBlock;
@property (nonatomic, copy) HeightForRowAtIndexPathBlock heightForRowBlock;
@property (nonatomic, copy) DidSelectRowAtIndexPathBlock selectBlock;
@property (nonatomic, copy) DidDeSelectRowAtIndexPathBlock deselectBlock;
@property (nonatomic, copy) ViewForSectionHeader viewForSectionHeaderBlock;
@property (nonatomic, copy) ViewForSectionFooter viewForSectionFooterBlock;
@property (nonatomic, copy) HeightForSectionHeader heightForSectionHeaderBlock;
@property (nonatomic, copy) HeightForSectionFooter HeightForSectionFooterBlock;
@property (nonatomic, copy) ScrollViewDidScroll scrollViewDidScroll;
@property (nonatomic, copy) ScrollViewDidScrollToTop scrollViewDidScrollToTop;
@property (nonatomic, copy) ScrollViewDidEndDecelerating scrollViewDidEndDecelerating;
@property (nonatomic, copy) ScrollViewWillBeginDecelerating scrollViewWillBeginDecelerating;
@property (nonatomic, copy) ScrollViewWillBeginDragging scrollViewWillBeginDragging;
@property (nonatomic, copy) willDisplayCell displayCell;
@property (nonatomic, copy) ScrollViewDidEndDragging scrollViewDidEndDragging;
@property (nonatomic, assign) NSInteger rows;
@property (nonatomic, assign) NSInteger sections;
@property (nonatomic, assign) NSTextAlignment sectionHeadTitleAlignment;
@property (nonatomic, strong) UIImageView *emptyDataView;
@property (nonatomic, assign) UITableViewCellEditingStyle selectEditingStyle;
@property (nonatomic, assign) BOOL isNeedControlKeFu;
-(id) initWithFrame:(CGRect)frame andStyle:(UITableViewStyle) style;
@end

NS_ASSUME_NONNULL_END
